<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link href="../css/docs.css" type="text/css" rel="stylesheet"/>
<link href="../css/prettify.css" type="text/css" rel="stylesheet"/>
<script src="../js/prettify.js" type="text/javascript"></script>
</head>
<body onLoad="prettyPrint()">
<div class="g-unit" id="doc-content">
  <div id="api-info-block">
    <div class="api-level">H3C CAS云管理平台</div>
  </div>
  <div id="jd-header">
    <h1>查询虚拟交换机实体信息</h1>
  </div>
  <div id="jd-content">
    <div class="jd-descr">
      <p>根据虚拟交换机ID查询虚拟交换机实体信息</p>

      <h2><a name="uri"></a>接口 URI</h2>
      <p>/cas/casrs/vswitch/query?vsId={vsId}</p>

      <h2><a name="access"></a>访问方法</h2>
      <dl>
        <dt><b>HTTP 方法</b></dt>
        <dd>GET</dd>
        <dt><b>参数</b></dt>
        <table id="pubmethods" class="jd-sumtable"><tbody><tr>
          <th colspan="2">查询参数（Query Parameter）</th>
        </tr>
	        
	        <tr >
	          <td class="jd-typecol"><span class="prettyprint lang-xml">vsId</span></td>
	          <td class="jd-linkcol" width="100%">
	            <span class="sympad">虚拟交换机id 。</span>
                <div class="jd-descrdiv">长整数（long）类型。必须。</div>	          </td>
	        </tr>
        </table>
      </dl>

      <h2><a name="result"></a>返回结果</h2>
      <dl>
      	<dt><b>状态码</b></dt>
    		<dd><ul>
    			<li>200(OK)：成功。</li>
    		</ul></dd>

	      <dt><b>消息头</b></dt>	      
	      <div class="source">
	        <pre class="prettyprint lang-xml">HTTP/1.1 200 OK<br>Content-Type: application/xml<br>Transfer-Encoding: chunked<br>Date: Wed, 17 Sep 2014 01:17:17 GMT</pre>
	      </div>

        <dt><b>消息体</b></dt>
        <div class="source">
          <pre class="prettyprint lang-xml">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;vSwitch&gt;<br>  &lt;id&gt;55&lt;/id&gt;<br>  &lt;name&gt;vswitch0&lt;/name&gt;
  &lt;description&gt;test vswitch&lt;/description&gt;<br>  &lt;portNum&gt;32&lt;/portNum&gt;<br>  &lt;mode&gt;0&lt;/mode&gt;
  &lt;vlanId&gt;6&lt;/vlanId&gt;
  &lt;isRuningVmUseVSwitch&gt;false&lt;/isRuningVmUseVSwitch&gt;<br>  &lt;enableLacp&gt;false&lt;/enableLacp&gt;<br>  &lt;bondMode&gt;balance-tcp&lt;/bondMode&gt;<br>  &lt;flag&gt;0&lt;/flag&gt;<br>  &lt;pnicList&gt;eth1&lt;/pnicList&gt;
  &lt;mtu&gt;1500&lt;/mtu&gt;<br>&lt;/vSwitch&gt;<br></pre>
        </div>
      <dt><a name="detail"></a><b>元素含义</b></dt>
        <table id="pubmethods" class="jd-sumtable"><tbody><tr>
          <th colspan="2"><span class="prettyprint lang-xml">vSwitch</span>各子元素</th>
		 <tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">id</span></td>
      <td class="jd-linkcol" width="100%"><span class="sympad">虚拟交换机ID。</span>
          <div class="jd-descrdiv">长整数（long）类型。</div></td>
    </tr>
    <tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml">name</span></td>
      <td class="jd-linkcol" width="100%"><span class="sympad">虚拟交换机名称。</span>
          <div class="jd-descrdiv">字符串（String）类型。</div></td>
    </tr>
	<tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">portNum</span></td>
      <td class="jd-linkcol" width="100%"><span class="sympad">端口数量。</span>
          <div class="jd-descrdiv">整数（int）类型。</div></td>
    </tr>
	 <tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml">mode</span></td>
      <td class="jd-linkcol" width="100%"><span class="sympad">转发模式。0 : veb; 1: vepa; 2:多通道。</span>
          <div class="jd-descrdiv">整数（int）类型。</div></td>
    </tr>
    <tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">isRuningVmUseVSwitch</span></td>
      <td class="jd-linkcol" width="100%"><span class="sympad">判断虚拟交换机是否被使用。</span>
          <div class="jd-descrdiv">布尔（Boolean）类型。</div></td>
    </tr>
	<tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml">flag</span></td>
      <td class="jd-linkcol" width="100%">虚拟交换机的创建方式：0：主机下创建，1：集群下创建。
            <div class="jd-descrdiv">整数（int）类型。</div></td>
    </tr>
    <tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">pnicList</span></td>
      <td class="jd-linkcol" width="100%"><span class="sympad">物理网卡名称列表。</span>
        <div class="jd-descrdiv"> 集合（List）类型。 </div></td>
    </tr>
    <tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml">enableLacp</span></td>
      <td class="jd-linkcol" width="100%"><span class="sympad">链路聚合模式(动态链路聚合：true，静态链路聚合：false。</span>
        <div class="jd-descrdiv">布尔（Boolean）类型。</div></td></tr>
	<tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">bondMode</span></td>
      <td class="jd-linkcol" width="100%"><span class="sympad">负载分担模式。枚举类型，启用lacp:balance-slb ，balance-tcp；不启用lacp:balance-slb ，balance-tcp, active-backup。 <br/>
	  balance-slb : 基本负载分担,balance-tcp : 高级负载分担,active-backup : 主备负载分担
</span>
          <div class="jd-descrdiv">字符串（String）类型。</div></td>
    </tr>
	<tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml">description</span></td>
      <td class="jd-linkcol" width="100%"><span class="sympad">描述信息。</span>
          <div class="jd-descrdiv">字符串（String）类型。</div></td>
    </tr>
	<tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">vlanId</span></td>
      <td class="jd-linkcol" width="100%"><span class="sympad">VLAN ID。虚拟交换机端口所在<span lang="EN-US">VLAN</span>的<span lang="EN-US">ID</span>。<span lang="EN-US">VLAN ID</span>的取值范围为<span lang="EN-US">2</span>～<span lang="EN-US">4094</span>。</span>
          <div class="jd-descrdiv">整数（int）类型。</div></td>
    </tr>  
	<tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml">mtu</span></td>
      <td class="jd-linkcol" width="100%"><span class="sympad">MTU值，取值范围1000-9000。</span>
        <div class="jd-descrdiv">整数（int）类型。</div></td>
    </tr>     
        </table>

	    <dt>&nbsp;</dt>
      </dl>
      

      <h2><a name="example"></a>应用举例</h2>
      <p>查询虚拟交换机id为55的虚拟交换机实体信息</p>
      <dl>
      	<dt><b>请求</b></dt>
        <div class="source">
          <pre class="prettyprint lang-xml">GET http://localhost:8080/cas/casrs/vswitch/query?vsId=55
accept: application/xml
...        </pre>
        </div>
      	<dt><b>回应</b></dt>
        <div class="source">
          <pre class="prettyprint lang-xml">
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 191<br>Date: Wed, 17 Sep 2014 02:07:09 GMT
...
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;vSwitch&gt;<br>  &lt;id&gt;55&lt;/id&gt;<br>  &lt;name&gt;vswitch0&lt;/name&gt;
  &lt;description&gt;test vswitch&lt;/description&gt;<br>  &lt;portNum&gt;32&lt;/portNum&gt;<br>  &lt;mode&gt;0&lt;/mode&gt;
  &lt;vlanId&gt;6&lt;/vlanId&gt;
  &lt;isRuningVmUseVSwitch&gt;false&lt;/isRuningVmUseVSwitch&gt;<br>  &lt;enableLacp&gt;false&lt;/enableLacp&gt;<br>  &lt;bondMode&gt;balance-tcp&lt;/bondMode&gt;<br>  &lt;flag&gt;0&lt;/flag&gt;<br>  &lt;pnicList&gt;eth1&lt;/pnicList&gt;<br>&lt;/vSwitch&gt;<br>
          </pre>
        </div>
      </dl>
  </div>
  </div>
</div>
</body>
</html>
